src = $(wildcard ./*/*.cpp)
curDirCPP = $(wildcard ./*.cpp)
obj = $(patsubst %.cpp,%.o,$(src))
curDirObj = $(patsubst %.cpp,%.o,$(curDirCPP))
mySet = -Wall -g -lpthread
11 = -std=c++11
ALL: a.out
a.out:$(obj) $(curDirObj)
	g++ $(11) $^ -o $@ $(mySet)
$(obj):%.o:%.cpp
	g++ $(11) -c $< -o $@ $(mySet)
$(curDirObj):%.o:%.cpp
	g++ $(11) -c $< -o $@ $(mySet)
clean:
	-rm -rf $(obj) a.out $(curDirObj)
.PHONY: clean ALL
